package com.jiangjiang.eshop.promotion.domain;

import com.baomidou.mybatisplus.annotation.*;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.util.Date;

/**
 * @ClassName CouponAchieveEntity
 * @Description TODO
 * @Author jhw
 * @Date 2021/7/22 10:24
 * @Version 1.0
 **/
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
@TableName("promotion_coupon_achieve")
public class CouponAchieveEntity {

    /**
     * id
     */
    @TableId(value = "id",type = IdType.AUTO)
    private Long id;
    /**
     * 优惠券id
     */
    @TableField("coupon_id")
    private Long couponId;
    /**
     * 用户账号id
     */
    @TableField("user_account_id")
    private Long userAccountId;
    /**
     * 是否使用过这个优惠券
     */
    @TableField("is_used")
    private Integer isUsed;
    /**
     * 使用优惠券的时间
     */
    @TableField("used_time")
    private Date usedTime;
    /**
     * 创建时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
    @TableField(value = "gmt_create",fill = FieldFill.INSERT)
    private Date gmtCreate;
    /**
     * 修改时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
    @TableField(value = "gmt_modified",fill = FieldFill.INSERT_UPDATE)
    private Date gmtModified;
}
